package week7.homework;

public class magazines extends Books {
    private long number;//杂志期数
public magazines(String name, String type,String author,double price,int pages,long number)
{
    super(type,name,author,price,pages);
    this.number=number;
}

    public long getNumber() {
        return number;
    }

    public void setNumber(long number) {
        this.number = number;
    }

    public String toString()
{
    return "\n"+"种类"+this.getType()+"\t书名"+this.getName()+"\t作者"+ this.getAuthor()+"\t价格"+this.getPrice()+"\t杂志期数"+ this.getNumber();
}
}
